package com.blb.ioc.demo1;

public class Computer {

    // 品牌
    private String brand;
    // CPU
    private Cpu cpu;
    // 内存
    private Memory memory;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Cpu getCpu() {
        return cpu;
    }

    public void setCpu(Cpu cpu) {
        this.cpu = cpu;
    }

    public Memory getMemory() {
        return memory;
    }

    public void setMemory(Memory memory) {
        this.memory = memory;
    }

    public void start(){
        System.out.println(brand+"电脑启动了");
        cpu.run();
        memory.Read();
        memory.write();
    }
}
